package com.mall.seckill.feign;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.mall.common.util.RespResult;
import com.mall.seckill.model.SeckillGoods;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author Darren
 * @date 2022-09-28 15:54
 * Description：
 */
@FeignClient(value = "mall-seckill")
@RequestMapping("/seckill/goods")
public interface SeckillGoodsFeign {

    @GetMapping("/{id}")
    @ApiOperation("根据Id查询秒杀商品详情")
    RespResult<SeckillGoods> getById(@PathVariable("id") String id);

    @GetMapping("/act/{actId}")
    @ApiOperation(value = "分页查询")
    RespResult<List<SeckillGoods>> getSeckillGoodsByActId(@PathVariable("actId") String actId);

}
